package com.lancoo.ccas52.mapper;

import com.lancoo.ccas52.entity.Student;
import com.lancoo.ccas52.pojo.dto.StudentRetakeDto;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

import com.lancoo.ccas52.entity.StudentRetake;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.ccas52.config.MybatisRedisCache;
import org.apache.ibatis.annotations.CacheNamespace;

/**
 * <p>
 * 重修学生表 Mapper 接口
 * </p>
 *
 * @author quin.song
 * @since 2023-04-10
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface StudentRetakeMapper extends BaseMapper<StudentRetake> {

    int addBatch(@Param("studentRetakeCollection") Collection<StudentRetake> studentRetakeCollection);

    /**
     * 根据课程id 校区 修读性质获取重修学生
     *
     * @param baseCourseId
     * @param flag
     * @return
     */
    List<Student> getStudentByCourseIdFlag(@Param("baseCourseId") String baseCourseId, @Param("flag") Integer flag, @Param("studyNature") Integer studyNature, @Param("campusId") String campusId);


}
